home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 2081 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: howland.reston.ans.net!gatech!hookup!hookup!not-for-mail
  2. From: mskucher@vertex.tor.hookup.net (Murray S. Kucherawy)
  3. Newsgroups: comp.lang.c,comp.unix.osf.osf1
  4. Subject: What exactly does pclose() return?
  5. Date: 18 Jan 1996 19:07:36 -0500
  6. Organization: HookUp Communication Corporation, Oakville, Ontario, CANADA
  7. Message-ID: <4dmnc8$t0u@vertex.tor.hookup.net>
  8. NNTP-Posting-Host: vertex.tor.hookup.net
  9. NNTP-Posting-User: mskucher
  10.  
  11. Does pclose() simply return the status of the child, or does it return one
  12. of those "wait" values where the status is really in the second byte of
  13. the return value?  What's it *supposed* to do?
  14.  
  15. For example, let's say I expect the exit status of a program to be
  16. 67 (like sendmail when it gets "no such user").  Should pclose()
  17. return 67, or 256*67?
  18.  
  19. The man page on OSF/1 doesn't say either way, but the weak wording suggests
  20. the former, and I'm getting the latter.  If I write my code to presume
  21. the latter, how portable is it going to be?
  22. -- 
  23. Murray S. Kucherawy ====================================== mskucher@hookup.net
  24. Engineering/Operations Manager                HookUp Communication Corporation
  25. (905) 847-8000                NIC Handle "MSK"       Oakville, Ontario, CANADA
  26. --                EMACS: Eight Megs And Constantly Swapping                 --
  27.